#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ll;
map<string ,ll> mp;
int main()
{
    IOS;
    ll n;
    string s1,s2;
    mp["Rock"]=1;
    mp["Scissors"]=2;
    mp["Paper"]=3;
    cin>>n;
    while(n--){
        cin>>s1>>s2;
        if(abs(mp[s1]-mp[s2])<2){
            if(mp[s1]==mp[s2])cout<<"Tie"<<endl;
            else {
                if(mp[s1]<mp[s2])cout<<"Player1"<<endl;
                else cout<<"Player2"<<endl;
            }
        }
        else {
            if(mp[s1]==1){
                cout<<"Player2"<<endl;
            }
            else cout<<"Player1"<<endl;
        }
    }
    getchar();
    getchar();
    return 0;
}
